interface Subject{
    id:number
    title:string
}

async function get_subjects(){
    const api='http://127.0.0.1:8000/chapter/subjects'
    const res=await fetch(api)
    return (await res.json()) as Subject[]
}

export{ Subject,get_subjects}